projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37b2392
)
cssbordervalue: Fix possible use of uninitialised
author
Daniel Boles
<dboles@src.gnome.org>
Tue, 1 Aug 2017 18:31:20 +0000
(19:31 +0100)
committer
Daniel Boles
<dboles@src.gnome.org>
Tue, 1 Aug 2017 19:14:50 +0000
(20:14 +0100)
If value->values[i] is NULL, then values[i] was left uninitialised.
The code then reads each element of values[].
CID
1432029
(#1 of 1): Uninitialized pointer read (UNINIT)
11. uninit_use: Using uninitialized value values[i].
gtk/gtkcssbordervalue.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssbordervalue.c
b/gtk/gtkcssbordervalue.c
index 514005728957d67159e4b63f5675d2bf23894d0b..d95196ca025e83bfc6687692b8ea2f80f83405e5 100644
(file)
--- a/
gtk/gtkcssbordervalue.c
+++ b/
gtk/gtkcssbordervalue.c
@@
-60,6
+60,10
@@
gtk_css_value_border_compute (GtkCssValue *value,
values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style);
changed |= (values[i] != value->values[i]);
}
+ else
+ {
+ values[i] = NULL;
+ }
}
if (!changed)